//
//  ReadandSaveCaches.m
//  GiftTalk
//
//  Created by dllo on 16/5/5.
//  Copyright © 2016年 JYJ. All rights reserved.
//

#import "ReadandSaveCaches.h"
#import "SandBoxHandler.h"
@implementation ReadandSaveCaches
//归档  存入
+ (void)saveAnyObjectIntoCaches:(id)AnyObject FileName:(NSString *)filename {
    [NSKeyedArchiver archiveRootObject:AnyObject toFile:[SandBoxHandler saveInCachesWithFileName:filename]];
    
}
//反归档  读出
+(id)readAnyObjectFromCaches:(NSString *)fileName {
    
    return [NSKeyedUnarchiver unarchiveObjectWithFile:[SandBoxHandler saveInCachesWithFileName:fileName]];
    
}


@end
